package com;

import java.util.Scanner;

import java.util.Scanner;
public class Demo02 {
    public static void main(String[]args){
        Scanner sc = new Scanner (System.in);
        int [] arr = new  int[6];
        for (int i = 0; i <arr.length ; i++) {
            System.out.println("请输入第" + (i + 1) + "个评委打分");
            int score = sc.nextInt();
            if(score>=0&&score<=100){
            arr[i]=score;
            }else{
                System.out.println("您输入的分数有误，请输入0-100之间的数字");
                i--;
            }
        }
        int max=arr[0];
        for (int i = 0; i <arr.length; i++) {
        if(arr[i]>max){
            max=arr[i];
        }
        }
        System.out.println(max);
        int min=arr[0];
        for (int i = 0; i <arr.length; i++) {
            if(arr[i]<min){
                min=arr[i];
            }
        }
        System.out.println(min);
        int sum=0;

        for (int i = 0; i <arr.length ; i++) {
            sum+=arr[i];
        }
        System.out.println("总和"+sum);
        int avg=(sum-max-min)/4;
    }
}
